package com.imooc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * 数据源（JDBC连接池）的介绍：
 * HikariCP是springboot的默认数据源，如果使用springmvc可以引用
 */
@SpringBootApplication(/*exclude = {SecurityAutoConfiguration.class}*/)
//扫描mybatis通用mapper所在的包 注意必须导入这个包tk.mybatis.spring.annotation.MapperScan
@MapperScan(basePackages = "com.imooc.mapper")
//@EnableTransactionManagement 开启Transactional注解，可加可不加，因为SpringBootApplication里包含该注解
//扫描所有包以及common下的相关组件包
@ComponentScan(basePackages = {"com.imooc", "org.n3r.idworker"})
@EnableScheduling //开启定时任务
//@EnableRedisHttpSession // 开启使用redis作为spring session
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }

}
